package com.qf.config;

import com.qf.pojo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * projectName: forth
 *
 * @author: MaTianWei
 * time: 2021/7/31 15:23
 * description:配置类,配置类在tomcat启动接会自动加载运行,只运行一次
 */
@Configuration
public class UserConfig {
    @Bean(name = "user1")
    public User getUser(){
        return new User(1,"张三");
    }
}
